let db = require('../db/index')

exports.getList = (req,res) => {
  db.query('select * from category',(err,data) => {
    if (err) {
      return res.send('获取失败' + err.message)
    }else{
      res.send({
        code:20000,
        data:data
      })
    }  
  })
}